<div class="ibox-content">
    <form class="form-horizontal" method="post" action="{:url('MaterialCategory/add')}">
        <div class="form-group">
            <label class="col-sm-2 control-label">上级分类</label>
            <div class="col-sm-8">
                <select name="pid" class="form-control chosen-select">
                    <option value="0">选择分类</option>
                    {volist name='type_select' id='vo'}
                    <option value="{$vo.id}"  {notempty name="pid"} {if condition="$pid eq $vo['id'] " }  selected="selected" {/if} {/notempty}>{$vo.treename}</option>
                    {/volist}
                </select>
                <span class="help-block m-b-none"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">分类名称</label>
            <div class="col-sm-8">
                <input name="name" class="form-control" type="text" placeholder="请输中文栏目名称" value="{$info['name']|default=''}"/>
                <span class="help-block m-b-none"></span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">栏目缩略图 </label>
            <div class="col-sm-10">
                {assign name="litpic" value="$info.litpic|default='0'" /}
                {:hook('File', ['name' => 'litpic', 'value' => $litpic, 'type' => 'imgs'])}
                <span class="help-block m-b-none"></span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">排位序号</label>
            <div class="col-sm-8">
                <input name="sort" class="form-control" type="digits" placeholder="栏目排序号" value="{$info['sort']|default='100'}"/>
                <span class="help-block m-b-none"></span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">分类介绍</label>
            <div class="col-sm-8">
                <textarea name="intro" class="form-control" placeholder="分类介绍">{$info.intro|default=''}</textarea>
                <span class="help-block m-b-none"></span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">是否启用</label>
            <div class="col-sm-8">
                <div class="radio radio-info radio-inline">
                    <input type="radio" id="visible1" value="1" name="visible">
                    <label for="visible1"> 是 </label>
                </div>
                <div class="radio radio-info radio-inline">
                    <input type="radio" id="visible0" value="0" name="visible">
                    <label for="visible0"> 否 </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                {include file="admin@layout/save_btn"}
            </div>
        </div>
    </form>
</div>

